Data conversion device having mediator for determining data conversion order

ABSTRACT

A data conversion device for converting analog data to digital data, or digital data to analog data, is composed of a data converter and a mediator. Plural data groups are fed to the data converter that coverts the data, group by group, upon receipt of a request for converting a particular data group. If plural requests are simultaneously made, the mediator makes mediation among the plural requests to select a data group to be first converted and to set a priority order. A function uniquely corresponding to a combination of the plural requests is generated in the mediator, and the mediation is performed based on the generated function with reference to a preinstalled table showing a relation between the function and the request to be selected.

CROSS-REFERENCE TO RELATED APPLICATION

[0001] This application is based upon and claims benefit of priority of Japanese Patent Application No. 2000-49783 filed on Feb. 25, 2000, the content of which is incorporated herein by reference.

BACKGROUND OF THE INVENTION

[0002] 1. Field of the Invention

[0003] The present invention relates to a data conversion device which converts analog data to digital data, or digital data to analog data, and more particularly to such a conversion device that includes a mediator for determining a priority order of data conversion when plural requests for converting various sets of data are simultaneously made.

[0004] 2. Description of Related Art

[0005] In an electronic control system for use in a recent automotive vehicle, various analog data to be converted into digital data are fed into an electronic control unit in the system. The analog data are sequentially converted into digital data according to requests for conversion. When plural requests for converting plural groups of analog data are simultaneously made, mediation for determining a priority order among the plural requests is made according to a predetermined rule.

[0006] An example of such mediation is described in JP-A-3225054. In this example, when plural requests for converting plural groups of analog data into digital data are made, the conversion is performed group by group, allocating a short period of time to each group. More particularly, a flag signal “1” is given when a request for converting a certain group of data is made, and flag signal “0” is given when no request is made. Such flag signals for all requests are stored in a memory. The groups of analog data corresponding to the flag signal “1” are sequentially converted into digital data group by group according to a predetermined priority order. In this process, it is necessary to search each request as to whether its flag is “1” or “0”.

[0007]FIG. 7 shows the process of searching the flag signals in the above example. The flag signals stored in the memory are searched one by one according to a predetermined priority order of the requests. This searching loop is repeated until a flag “1” is found. Upon finding the flag “1”, the corresponding analog data group is selected as a data group to be converted. If no flag “1” is found throughout the search, the process moves out of the searching loop. Since the flag search is performed one by one until a flag “1” is found, it consumes time. That is, if a flag “1” is found at the i^(th) loop and one loop requires Tr nanoseconds, (Tr×i) nanoseconds are consumed for that search. If a flag “1” is found at the request having the lowest priority, the searching loop has to be repeated for all the requests.

[0008] Since the number of requests (the number of analog data groups to be converted into digital data) tends to increase in recent electronic control systems, it is a major problem that a long time is consumed for mediating the requests in the data conversion process. The same problem exists in a data conversion device for converting digital data to analog data.

SUMMARY OF THE INVENTION

[0009] The present invention has been made in view of the above-mentioned problem, and an object of the present invention is to provide an improved data conversion device in which the mediation among plural requests is quickly performed thereby to speed up the data conversion. Another object of the present invention is to provide a method for efficiently making mediation among the plural requests for data conversion.

[0010] The data conversion device according to the present invention is composed of a data converter and a mediator. Plural analog data groups to be converted into digital data are fed into the data converter, and an analog data group is converted group by group according to a request for conversion. If plural requests for conversion are simultaneously made, it is necessary to make mediation among the plural requests to select a data group to be first converted and to set a priority order. The mediator of the present invention performs such mediation. The data converter converts the analog data of the selected group into digital data according to the priority order determined by the mediator.

[0011] All the requests (Ri) for conversion are given respective priority orders. Further, when a certain request is actually made, a flag signal “1” is given to the request (Ri=1), and a flag signal “0” is given when no request is made (Ri=0). Each request (Ri) is weighted with a j^(th) power of 2, and all the weighted requests are summed up. In other words, a function (F) corresponding to a combination of all the requests (Ri) is generated according to the following formula: F=Σ(2_(j)×Ri), where i and j are integers different from each other. On the other hand, a table showing a relation between the function (F) and a request to be selected is preinstalled in the mediator. The mediator selects the data group to be converted, based on the function (F) by referring to the table.

[0012] Since the function (F) uniquely corresponds to each combination of all the requests, the request to be selected is easily and quickly determined based on the function (F). Various forms of the function (F) may be used for the mediation purpose, as long as the function (F) uniquely corresponds to a respective combination of requests (Ri). If the function (F) is formulated by summing up the requests (Ri) weighted with j^(th) power of 2, as mentioned above, the mediator can be structured in a simple form, even in a hardware form. As the weighting factor of requests (Ri), 2^((i−1)) may be used in place of 2 ^(j). The present invention may be similarly applied to a data converter for converting digital data to analog data.

[0013] According to the present invention, a request for data conversion having a higher priority is quickly selected from among plural requests through the mediation without searching all the requests one by one. Therefore, data conversion can be performed in a higher speed.

[0014] Other objects and features of the present invention will become more readily apparent from a better understanding of the preferred embodiment described below with reference to the following drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0015]FIG. 1 is a block diagram showing a device for converting analog data into digital data according to the present invention;

[0016]FIG. 2 is a chart showing a mediation process in the data conversion device according to the present invention;

[0017]FIG. 3 is an example of a table for selecting requests in the mediation process;

[0018]FIG. 4 is a time chart showing a data conversion process carried out according to the mediation of the present invention;

[0019]FIG. 5 is a table for selecting requests in the mediation process, the table being simplified for explanation purpose;

[0020]FIG. 6 is a block diagram briefly showing a device for converting digital data into analog data; and

[0021]FIG. 7 is a flowchart showing a process of selecting a request in a conventional device.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

[0022] With reference to FIGS. 1 to 5, a preferred embodiment of the present invention will be described. FIG. 1 shows a data conversion device that converts various analog data fed thereto into digital data in an order determined by mediation among plural requests for conversion. The conversion device is composed of an analog controller 10 that converts analog data inputs into digital data and a digital controller 20 that instructs an order of data conversion to the analog controller 10 and stores the converted digital data therein. The analog controller 10 includes a multiplexor 11 and an A-D converter 12. The digital controller 20 includes a mediator 21, a data controller 22 and data registers 23.

[0023] The mutiplexor 11 receives plural groups of analog data and outputs a group of analog data which is instructed to be output from time to time. The A-D converter 12 converts the analog data supplied from the multiplexor 11 into digital data.

[0024] Requests for data conversion R1, R2 . . . Rm, each of which indicates an analog data group to be converted into digital data, are input to the mediator 21. The requests for conversion are generated in devices (not shown) such as a microcomputer or an interface logic in the system. Each request is stored in the mediator 21 in a form of a flag signal “1” or “0”. The flag signal “1” indicates that a request is made and the flag signal “0” indicates that no request is made. It is highly possible that plural requests are made at a same time, because requests generated in various devices may be fed at the same time, or an interrupting request may be made. The mediator 21 selects one request from among plural requests based on a predetermined request priority order when there are plural requests at a same time. The selected request is fed to the A-D converter 12. Details of the mediator 21 will be described later.

[0025] The data controller 22 receives converted digital data from the A-D converter 12. The converted digital data are stored in the data registers 23 consisting of m registers, register 1, register 2 . . . register m. Each group of converted digital data is stored in a corresponding register, i.e., a digital data group converted according to a request Ri is stored in the register i. Devices in the system, such as a microcomputer, read out the digital data stored in the data resisters 23.

[0026] Referring to FIG. 2, the structure and operation of the mediator 21 will be described. The mediator 21 includes memories 31 for storing the flag signals, multiplying logics 32, an adding logic 33, and a referring logic 34. The flag signals of all the requests R1 to Rm are stored in the corresponding memories 31, respectively. In the multiplying logic 32, the flag signal corresponding to each request Ri is processed according to the following formula to generate a value Gi: Gi=2^((i−1))×Ri (Ri=1 or O; i=1 to m). All the values Gi calculated in each multiplying logic 32 are summed up in the adding logic 33, thereby to generate a function F: F=ΣGi =(2⁰×R1) +(2¹ ×R2) . . . +(2^((m−1))×Rm). A value of the function F uniquely corresponds to a given combination of all the requests R1 to Rm. Since the flag signals of Ri, 1 or 0, are weighted with (i−1)th power of 2, the adding process can be easily carried out in the adding logic 33 by shifting bit calculation to left or right.

[0027] The calculated value of the function F is fed into the referring logic 34 that contains a request priority table therein. An example of the request priority table is shown in FIG. 3. In this table, the flag signal (1 or 0) corresponding to each request (R1 to Rm) and a request to be selected according to a particular value of the function F are listed. It is predetermined, in this exemplary table, that a request having a higher suffix has a higher priority, i.e., the priority of request R1 is the lowest and that of request Rm is the highest. However, the order of priority may be arbitrarily set, not limited to the order exemplified. The referring logic 34 selects one request having the highest priority from among requests having the flag signal “1”, based on the value of the function F, referring to the request priority table. Each logic included in the mediator 21 may be structured in a hardware or in a software.

[0028] To further clarify the operation of the mediator 21 described above, a simplified example which handles only three requests R1, R2 and R3 will be described below with reference to FIGS. 4 and 5. In this example, it is predetermined that R3 has the highest priority, R1 the lowest and R2 intermediate. The values of the function F are calculated as shown in FIG. 5 for each combination of request flags. For example, the function value 5 corresponds to a request combination (R1=1, R2=0, R3=1; F=1×2⁰+0×2¹+1×2²=5). When the function F is calculated as 5, the request R3 is selected because R1 and R3 have the flag “1” and R3 has a higher priority than R1.

[0029] Now, referring to FIG. 4, the timing of the data conversion will be described, taking the same example shown in FIG. 5. The timing chart of FIG. 4 shows two mediation processes, mediation process 1 and mediation process 2. In the timing chart, vertical arrows pointing downward show the timing of a conversion request is made, and the length of each horizontal arrow shows a period of time during which data conversion is carried out.

[0030] First, the conversion operation carried out under mediation process 1 will be described. Upon receipt of a request, the mediator 21 immediately performs mediation and the data corresponding to a selected request are converted into digital data. If a new request is made during a period in which the conversion is being performed, a mediation between the former request and the new request is done, and the data corresponding to the selected request as a result of the mediation are converted, interrupting the former data conversion.

[0031] Some particular examples under mediation process 1 will be explained with reference to the timing chart. In period I, upon receipt of request R1 (no other requests are made), the mediator 21 selects request R1 based on the value of function F (F=1, indicating to select R1 as shown in FIG. 5). The data corresponding to request R1 are converted immediately following the mediation. In period II, a new request R2 is made during the data corresponding to request R1 are being converted. A mediation between R1 and R2 is carried out upon receipt of R2, and R2 is selected based on the F value (F=3, indicating to select R2 as shown in FIG. 5). At this point, the data conversion corresponding to R1 is interrupted and the data conversion corresponding to R2 is carried out. Upon completion of the data conversion corresponding to R2 (R2 disappears at this point), request R1 is again selected based on the F value (F=1, indicating to select R1). At this point, the interrupted data conversion corresponding to R1 is resumed again. In period III, R1 is interrupted upon receipt of R2 in the same manner as in period II, and further, R2 is interrupted upon receipt of R3. At the time of the interruption of R2, request R3 having the highest priority is processed, then the data conversion corresponding to R2 and R3 follows in this order.

[0032] Under mediation process 2, the data conversion which is being carried out according to a selected request is not interrupted, as opposed to that under mediation process 1. In other words, the data conversion is sequentially carried out according to each selected request. In period I, R1 is selected in the mediation and processed in the same manner as in mediation process 1. In period II, the data conversion corresponding to R1 is not interrupted by input of R2. The mediation between R1 and R2 is not done at that point, but it is done after completion of the conversion process corresponding to R1. In period III, R1 is not interrupted by R3 even though R3 has a higher priority than R1. After completion of R1 conversion, a mediation is performed to select R3. Similarly, during the R3 conversion no mediation is made, and only after the R3 conversion is completed, the next mediation is performed.

[0033] Advantages of the present invention are summarized as follows. Since a combination of plural requests for data conversion is represented by the function F which is unique to that combination, a request having the highest priority among plural requests can be quickly selected based on the function F. It is not necessary to search a request to be selected by repeating a searching loop as done in the conventional device. Therefore, the mediation process is much simplified and time required for the mediation is considerably shortened.

[0034] Since the function F is formulated in a simple form that includes only multiplication and addition, the function F can be calculated in a simple process. Therefore, the mediator 21 can be composed of the multiplying logics 32, the adding logic 33 and the referring logic 34. Those logics can be realized in a hardware structure. In addition, since the multiplication is performed in plural multiplying logics 32, each corresponding to each request, the multiplication process requires only a short period of time.

[0035] Since the priority order of the requests is determined based on the function F, referring to the table preinstalled in the mediator 21, the determination can be carried out in a simple process. Further, since the table can be revised, the priority order of the request can be easily changed according to particular needs. Also, since the table is installed in the mediator 21, information regarding the priority order can be kept secret against third parties.

[0036] The present invention may be modified into various forms. For example, the function F expressed in the formula, F=Σ(2^((i−1))×Ri) in the foregoing embodiment may be modified to the following formula: F=Σ(2^((i+k))×Ri), where k is an integer. Alternatively, the following function may be used: F=Σ(2^(j)×Ri), where j is an integer and j≠i. Further, as long as the value of the function F uniquely corresponds to a combination of requests Ri, any function expressed in a form other than the above form may also be used.

[0037] Though an analog-to-digital conversion device is shown in the foregoing embodiment, the present invention is also applicable to a digital-to-analog conversion device in a similar manner. FIG. 6 briefly shows a D-A conversion device 40 to which the present invention is applied. Requests Ri (R1 to Rm) for converting digital data to analog data are fed to a mediator 41 and stored therein as flag signals, “1” or “0”. The same function F as explained in the above embodiment is similarly generated in the mediator 41. The priority order among the plural requests Ri is determined based on the value of the function F by referring to the request priority table, in the same manner as explained in the foregoing embodiment. The selected request in the mediator 41 is fed into a D-A converter 42 which outputs converted analog data. In this D-A conversion device 40, too, the same advantages obtained in the A-D conversion device described above are attained.

[0038] It is also possible to realize the function F in a Field Programmable Gate Array (FPGA) contained in the mediator 21 or 41 and to arbitrarily rewrite the form of the function F.

[0039] While the present invention has been shown and described with reference to the foregoing preferred embodiment, it will be apparent to those skilled in the art that changes in form and detail may be made therein without departing from the scope of the invention as defined in the appended claims. 

What is claimed is:
 1. A data conversion device for converting data between analog and digital, the data conversion device comprising: a mediator for selecting a data group to be converted from among a plurality of data groups which are requested to be converted, each request having a respective priority order being stored in the mediator as a flag signal, a function representing a combination of requests being calculated using the priority order, the data group to be converted being determined based on the function; and a data converter connected to the mediator for converting the data group selected by the mediator.
 2. The data conversion device as in claim 1, wherein: the function uniquely corresponds to each combination of the plurality of requests.
 3. The data conversion device as in claim 2, wherein: the mediator includes a table showing a relation between the function and the priority order of the requests; and the mediator determines the data group to be converted by referring to the table.
 4. The data conversion device as in claim 1, wherein: the function (F) is expressed in a formula, F=G1+G2+ . . . +Gm, where Gi=(2^(j)×Ri), Ri is the flag signal 1 or 0, i is an integer, 1 to m, and j is an integer having a value which is different from that of each i.
 5. The data conversion device as in claim 4, wherein: the mediator comprises a plurality of multiplying logics, each calculating Gi for each Ri; an adding logic for calculating F by adding all of Gi; and a mediating logic for selecting the data group to be converted according to the priority order.
 6. The data conversion device as in claim 5, wherein: the mediator includes a table showing a relation between the function and the priority order of the requests; and the mediator determines the data group to be converted by referring to the table.
 7. A method of selecting an analog data group to be converted into digital data from among a plurality of analog data groups, when a plurality of requests for converting respectively different analog data groups are simultaneously made, the method comprising: giving a priority order to all the requests (Ri); generating a function (F) uniquely representing a combination of the plurality of requests; forming a table showing a relation between the data group to be selected and the function (F); and determining the data group to be selected based on the function (F) by referring to the table.
 8. The method of selecting an analog data group as in claim 7, wherein: each request (Ri) is represented by a flag signal “1” when the request is actually made and by a flag signal “0” when the request is not actually made.
 9. The method of selecting an analog data group as in claim 8, wherein the function (F) is expressed in a formula: F=Σ(2^(j)×Ri), where i and j are integers, and j has a value which is different from that of each i.
 10. The method of selecting an analog data group as in claim 9, wherein the integer j is (i−1). 